' T%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%W%
 
 ' Q%          N a m e :   T W i n G o B a s i c T o u c h _ 0 3 . t x t                 D a t e :   2 0   M a r   2 0 2 4   Q%
 
 ' Q%      A u t h o r :   L e o n a r d o                                                                                   Q%
 
 ' Q%        S c o p e :   T e s t   a l l   t h e   f u n c t i o n a l i t y   o f   t h e   T W i n G o   B A S I C 1     Q%
 
 ' `%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%c%
 
 ' Q%  M O T O R   1   S T S 3 2 1 5   F e e T e c h                                                                         Q%
 
 ' Q%  M O T O R   2   S T S 3 2 1 5   F e e T e c h                                                                         Q%
 
 ' Q%  M O T O R   3   S T S 3 2 1 5   F e e T e c h                                                                         Q%
 
 ' Q%  M O T O R   4   S T S 3 2 1 5   F e e T e c h                                                                         Q%
 
 ' `%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%c%
 
 ' Q%H a r d w a r e :   O n e   U R T - 1   f r o m   F e e T e c h                                                         Q%
 
 ' Q%                    M a s t e r   w i t h   4   e n c o d e r s   k n o b   &   1 0   b u t t o n s                     Q%
 
 ' `%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%c%
 
 ' Q%I S O       C u l t u r e     G e n d e r       A g e           N a m e                                                 Q%
 
 ' _% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %b%
 
 ' Q%E N G       E N - U S         M a l e           A d u l t       M i c r o s o f t   D a v i d   D e s k t o p           Q%
 
 ' Q%E N G       E N - U S         F e m a l e       A d u l t       M i c r o s o f t   Z i r a   D e s k t o p             Q%
 
 ' Q%I T A       I T - I T         F e m a l e       A d u l t       M i c r o s o f t   E l s a   D e s k t o p             Q%
 
 ' Q%J P N       J A - J P         F e m a l e       A d u l t       M i c r o s o f t   H a r u k a   D e s k t o p         Q%
 
 ' Q%Z H O       Z H - C N         F e m a l e       A d u l t       M i c r o s o f t   H u i h u i   D e s k t o p         Q%
 
 ' Z%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%]%
 
 O p t i o n   S p e e d   9 
 
 L o a d   i m a g e s \ T W i n G o _ T o u c h . j p g 
 
 B e e p   " 2 5 0 0   2 0 ,   1 5 0 0   1 0 0 " 
 
 T T S   S e l e c t V o i c e   " E N G " 
 
 ' T T S   S e l e c t V o i c e   " Z H O " 
 
 ' s 1   =   T T S v o i c e s 
 
 T T S   S e t V o l u m e   1 0 0             ' 1 0 0 
 
 T T S   S e t S p e e d   - 1 
 
 ' T T S   S e l e c t V o i c e   5       ' 3 
 
 
 
 '   T%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%W%
 
 '   Q%  S L O T   T E X T   f o r   C O M M A N D S   a n d   R E S P O N S E S               Q%
 
 '   Z%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%]%
 
 ' V a r i a b l e   N u m e r i c   S l o t _ C o m m a n d s T o M o t o r s             =   5 0 
 
 V a r i a b l e   N u m e r i c   S l o t _ C o m m a n d s T o C o b o t               =   5 1 
 
 V a r i a b l e   N u m e r i c   S l o t _ R e s p o n s e s F r o m C o b o t         =   5 2 
 
 V a r i a b l e   N u m e r i c   S l o t _ E x t e r n a l C o m m a n d s             =   5 3 
 
 
 
 '   T%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%W%  %%%%  %      %%%%  %%%%%
 
 '   Q%  S L O T   I N I T I A L I Z A T I O N S                                               Q%  %%%%  %      %    %      %
 
 '   Z%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%]%  %%%%  %%%  %%%%      %
 
 ' V a r i a b l e   N u m e r i c   S l o t _ P e d a l                             =     1 0 
 
 ' V a r i a b l e   N u m e r i c   S l o t _ S e t W a y P o i n t                 =     9 1 4 
 
 
 
 V a r i a b l e   N u m e r i c   S l o t _ M a s t e r S t a t u s                 =     9 0 8 
 
 
 
 V a r i a b l e   N u m e r i c   S l o t _ S i g n a l S c o p e                   =     9 8 3 
 
 
 
 V a r i a b l e   N u m e r i c   S l o t _ E n c o d e r 1                         =     9 2 1 
 
 V a r i a b l e   N u m e r i c   S l o t _ E n c o d e r 2                         =     9 2 2 
 
 V a r i a b l e   N u m e r i c   S l o t _ E n c o d e r 3                         =     9 2 3 
 
 V a r i a b l e   N u m e r i c   S l o t _ E n c o d e r 4                         =     9 2 4 
 
 
 
 V a r i a b l e   N u m e r i c   S l o t _ F i r s t F i v e B u t t o n           =     9 2 6 
 
 V a r i a b l e   N u m e r i c   S l o t _ S e c o n d F i v e B u t t o n         =     9 2 7 
 
 
 
 V a r i a b l e   N u m e r i c   S l o t _ M o t o r s F P S                       =     5 6 
 
 
 
 V a r i a b l e   N u m e r i c   S l o t _ M 1 _ d e s B a s e                     =   1 0 1 
 
 V a r i a b l e   N u m e r i c   S l o t _ M 2 _ d e s I n n e r                   =   1 5 1 
 
 V a r i a b l e   N u m e r i c   S l o t _ M 3 _ d e s M i d d l e                 =   2 0 1 
 
 V a r i a b l e   N u m e r i c   S l o t _ M 4 _ d e s O u t e r                   =   2 5 1 
 
 
 
 V a r i a b l e   N u m e r i c   S l o t _ M 1 _ p o s B a s e                     =   1 0 2 
 
 V a r i a b l e   N u m e r i c   S l o t _ M 2 _ p o s I n n e r                   =   1 5 2 
 
 V a r i a b l e   N u m e r i c   S l o t _ M 3 _ p o s M i d d l e                 =   2 0 2 
 
 V a r i a b l e   N u m e r i c   S l o t _ M 4 _ p o s O u t e r                   =   2 5 2 
 
 
 
 V a r i a b l e   N u m e r i c   S l o t _ M 1 _ D e l t a B a s e                 =   1 4 9 
 
 V a r i a b l e   N u m e r i c   S l o t _ M 2 _ D e l t a I n n e r               =   1 9 9 
 
 V a r i a b l e   N u m e r i c   S l o t _ M 3 _ D e l t a M i d d l e             =   2 4 9 
 
 V a r i a b l e   N u m e r i c   S l o t _ M 4 _ D e l t a O u t e r               =   2 9 9 
 
 
 
 '   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   M i c r o V i d e o 
 
 V a r i a b l e   N u m e r i c   S l o t _ T a k e I m a g e                       =   9 1 5 
 
 V a r i a b l e   N u m e r i c   S l o t _ S t a r t S t o p V i d e o             =   9 1 6 
 
 V a r i a b l e   N u m e r i c   S l o t _ S a v e V i d e o                       =   9 1 7 
 
 
 
 V a r i a b l e   N u m e r i c   S l o t _ M 1 _ M i n     	 	 	   =   8 5 
 
 V a r i a b l e   N u m e r i c   S l o t _ M 1 _ M a x     	 	 	   =   2 8 0 
 
 V a r i a b l e   N u m e r i c   S l o t _ M 2 _ M i n     	 	 	   =   8 0 
 
 V a r i a b l e   N u m e r i c   S l o t _ M 2 _ M a x     	 	 	   =   2 7 5 
 
 V a r i a b l e   N u m e r i c   S l o t _ M 3 _ M i n     	 	 	   =   4 0 
 
 V a r i a b l e   N u m e r i c   S l o t _ M 3 _ M a x     	 	 	   =   3 2 0 
 
 V a r i a b l e   N u m e r i c   S l o t _ M 4 _ M i n     	 	 	   =   3 7 
 
 V a r i a b l e   N u m e r i c   S l o t _ M 4 _ M a x     	 	 	   =   3 2 0 
 
 
 
 '   T%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%W%  %%%%  %    %  %%%%%  %%%%%  %%%%  %%  %  %%%%
 
 '   Q%  B U T T O N S                                                       Q%  %%%%  %    %      %          %      %    %  %  %%  %%%%
 
 '   Z%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%]%  %%%%  %%%%      %          %      %%%%  %    %  %%%%
 
 B u t t o n   1   L a b e l   M o t o r F P S 
 
 B u t t o n   M o t o r F P S   T e x t   " N O   M O T O R S " 
 
 B u t t o n   M o t o r F P S   C o l o r   F l a s h i n g 7   Y e l l o w   D a r k O r a n g e 
 
 
 
 B u t t o n   2   L a b e l   " M o t o r T e m p " 
 
 
 
 B u t t o n   3   L a b e l   C u r r e n t M e t e r 
 
 
 
 ' B u t t o n   4   L a b e l   O p e n F P S 
 
 ' B u t t o n   O p e n F P S   T e x t   " O p e n   F P S   s c o p e " 
 
 ' B u t t o n   O p e n F P S   C o l o r   P a l e T u r q u o i s e 
 
 
 
 B u t t o n   4   L a b e l   G o T o H o m e 
 
 B u t t o n   G o T o H o m e   T e x t   " G o T o   H o m e " 
 
 B u t t o n   G o T o H o m e   C o l o r   Y e l l o w 
 
 
 
 B u t t o n   5   L a b e l   S e t 1 7 0 
 
 B u t t o n   S e t 1 7 0   T e x t   " S e t   1 7 0 " 
 
 B u t t o n   S e t 1 7 0   C o l o r   Y e l l o w 
 
 
 
 B u t t o n   6   L a b e l   N e e d l e s 
 
 B u t t o n   N e e d l e s   T e x t   " N e e d l e s " 
 
 B u t t o n   N e e d l e s   C o l o r   G o l d 
 
 
 
 ' B u t t o n   7   L a b e l   A I f a c e 
 
 ' B u t t o n   A I f a c e     T e x t   " A I f a c e " 
 
 ' B u t t o n   A I f a c e     C o l o r   D a r k O r a n g e 
 
 
 
 B u t t o n   8   L a b e l   T W i n G o T e s t 
 
 B u t t o n   T W i n G o T e s t   T e x t   " T W i n G o   T e s t " 
 
 B u t t o n   T W i n G o T e s t   C o l o r   G o l d 
 
 
 
 B u t t o n   9   L a b e l   T u n i n g 
 
 B u t t o n   T u n i n g   T e x t   " T u n i n g " 
 
 B u t t o n   T u n i n g   C o l o r   G o l d 
 
 
 
 ' B u t t o n   1 0   L a b e l   S e a S u n 
 
 ' B u t t o n   S e a S u n   T e x t   " S e a S u n " 
 
 ' B u t t o n   S e a S u n   C o l o r   H o t P i n k 
 
 
 
 B u t t o n   1 0   L a b e l   P h o n e 
 
 B u t t o n   P h o n e   T e x t   " P h o n e " 
 
 B u t t o n   P h o n e   C o l o r   S k y B l u e 
 
 
 
 B u t t o n   1 2   L a b e l   R e p e a t O n O f f 
 
 B u t t o n   R e p e a t O n O f f   T e x t   " R e p e a t   O F F " 
 
 B u t t o n   R e p e a t O n O f f   C o l o r   L i g h t S t e e l B l u e 
 
 
 
 B u t t o n   1 3   L a b e l   V o i c e O u t p u t O n O f f 
 
 B u t t o n   V o i c e O u t p u t O n O f f   T e x t   " V o i c e   O N " 
 
 B u t t o n   V o i c e O u t p u t O n O f f   C o l o r   G r e e n 
 
 
 
 B u t t o n   1 4   L a b e l   B u t t o n M e a n i n g 
 
 B u t t o n   B u t t o n M e a n i n g   T e x t   " M e a n i n g " 
 
 B u t t o n   B u t t o n M e a n i n g   C o l o r   P e a c h P u f f 
 
 
 
 B u t t o n   1 7   L a b e l   D e l t a 
 
 B u t t o n   D e l t a   T e x t   " D e l t a " 
 
 B u t t o n   D e l t a   C o l o r   L i g h t B l u e 
 
 
 
 B u t t o n   1 8   L a b e l   V i d e o O n O f f 
 
 B u t t o n   V i d e o O n O f f   T e x t   " R E C O R D   O F F " " 
 
 B u t t o n   V i d e o O n O f f   C o l o r   L i g h t C y a n 
 
 
 
 B u t t o n   1 9   L a b e l   S a v e V i d e o 
 
 B u t t o n   S a v e V i d e o   T e x t   " S a v e   V i d e o " 
 
 B u t t o n   S a v e V i d e o   C o l o r   L i g h t B l u e 
 
 
 
 B u t t o n   2 0   L a b e l   T a k e I m a g e 
 
 B u t t o n   T a k e I m a g e   T e x t   " T a k e   i m a g e " 
 
 B u t t o n   T a k e I m a g e   C o l o r   L i g h t C y a n 
 
 
 
 B u t t o n   2 1   L a b e l   R e S e t H o m e P o s i t i o n 
 
 B u t t o n   R e S e t H o m e P o s i t i o n   T e x t   " R e S e t H o m e P o s i t i o n " 
 
 B u t t o n   R e S e t H o m e P o s i t i o n   C o l o r   B l a c k 
 
 
 
 B u t t o n   2 2   L a b e l   R e c o n n e c t M a s t e r 
 
 B u t t o n   R e c o n n e c t M a s t e r   T e x t   " C o n n e c t   E N C " 
 
 B u t t o n   R e c o n n e c t M a s t e r   C o l o r   L i g h t B l u e 
 
 
 
 B u t t o n   2 3   L a b e l   O p e n S c o p e s 
 
 B u t t o n   O p e n S c o p e s   T e x t   " O p e n   S c o p e s " 
 
 B u t t o n   O p e n S c o p e s   C o l o r   P a l e T u r q u o i s e 
 
 
 
 B u t t o n   2 4   L a b e l   O p e n S c o p e _ F P S 
 
 B u t t o n   O p e n S c o p e _ F P S   T e x t   " O p e n   S c o p e   F P S " 
 
 B u t t o n   O p e n S c o p e _ F P S   C o l o r   P a l e T u r q u o i s e 
 
 
 
 B u t t o n   2 5   L a b e l   C l o s e S c o p e s 
 
 B u t t o n   C l o s e S c o p e s   T e x t   " C l o s e   S c o p e s " 
 
 B u t t o n   C l o s e S c o p e s   C o l o r   S k y B l u e 
 
 
 
 B u t t o n   2 6   L a b e l   S a f e 
 
 B u t t o n   S a f e   T e x t   " S a f e " 
 
 B u t t o n   S a f e   C o l o r   G r e e n 9 
 
 
 
 B u t t o n   2 8   L a b e l   S c o p e s A c t i v e 
 
 B u t t o n   S c o p e s A c t i v e   T e x t   " S c o p e s   O N " 
 
 B u t t o n   S c o p e s A c t i v e   C o l o r   S k y B l u e 
 
 
 
 B u t t o n   2 9   L a b e l   S a y 
 
 B u t t o n   S a y   T e x t   " S a y " 
 
 B u t t o n   S a y   C o l o r   N a v a j o W h i t e 
 
 
 
 
 
 '   T%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%W%  %      %%%%  %%%%  %%%%
 
 '   Q%  L O A D   A P P S                                                                     Q%  %      %    %  %%%%  %    %
 
 '   Z%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%]%  %%%  %%%%  %    %  %%%%
 
 S a f e 
 
 B u t t o n M e a n i n g S t a t u s   =   " D i s p l a y   O f f " 
 
 
 
 L o a d   T h e r e m i n o _ M o t o r s . e x e 
 
 L o a d   T h e r e m i n o _ S l o t V i e w e r _ M o t o r s . e x e 
 
 L o a d   T h e r e m i n o _ H A L . e x e 
 
 L o a d   T h e r e m i n o _ S l o t V i e w e r _ M a s t e r _ E n c . e x e 
 
 L o a d   T h e r e m i n o _ S l o t V i e w e r _ S T R . e x e 
 
 ' L o a d   T h e r e m i n o _ M i c r o v i d e o . e x e 
 
 ' L o a d   T h e r e m i n o _ S l o t V i e w e r _ T S I O . e x e 
 
 
 
 W a i t A p p l i c a t i o n s S t a r t e d 
 
 
 
 W a i t A l l M o t o r s 
 
 
 
 ' D e A c t i v a t e M o t o r s 
 
 ' C o p y P o s i t i o n s T o D e s t i n a t i o n s 
 
 
 
 '   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
 '     M O T O R S   m u s t   b e   a c t i v e   b e f o r e   C o b o t 
 
 '   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
 
 
 L o a d   T h e r e m i n o _ C o b o t . e x e 
 
 
 
 ' L o a d   " . . \ F i l e s \ A n a l o g _ B u t t o n _ F u n c t i o n s . t x t " 
 
 L o a d   H i d e 
 
 
 
 '   T%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%W%      %%%%    %%%%%    %%%%%    %%%%%    %%%%%
 
 '   Q%    E X E C U T I O N   S T A R T   F R O M   H E R E                                   Q%      %%%%        %        %%%%%    %%%%%        %
 
 '   Z%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%]%      %%%%        %        %      %    %    %%        %
 
 
 
 R e s e t E n c o d e r s 
 
 S l o t ( S l o t _ S i g n a l S c o p e )   =   1 0 0 0 
 
 C o n t r o l s   O p e n T e x t B o x 
 
 C o n t r o l s   C l e a r T e x t B o x 
 
 
 
 ' V o i c e C o m m a n d s C o m m a n d s S t a t u s   =   " a c t i v e " 
 
 ' V o i c e C o m m a n d s C o m m a n d s S t a t u s   =   " " 
 
 ' I n t e r p r e t a t e V o i c e C o m m a n d s C o m m a n d s 
 
 
 
 V o i c e O u t p u t S t a t u s   =   " a c t i v e " 
 
 ' V o i c e O u t p u t S t a t u s   =   " " 
 
 V o i c e O u t p u t O n O f f 
 
 T T S   S p e a k   " T h e r e m i n o   A u t o m a t i o n   l a n g u a g e   i s   r u n n i n g . " 
 
 
 
 ' T W i n G o T e s t 
 
 ' N e e d l e s 
 
 ' T u n i n g 
 
 ' S e a S u n 
 
 ' C o i n s 
 
 
 
 L o o p 
 
 
 
 '   T%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%W%  %      %%%%  %%%%  %%%%
 
 '   Q%  L O O P                                                                               Q%  %      %    %  %    %  %%%%
 
 '   Z%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%]%  %%%  %%%%  %%%%  %
 
 L a b e l   L o o p 
 
 	 C u r r e n t M e t e r 
 
 	 ' T o r q u e M e t e r 
 
 	 ' T e s t T e m p 
 
 	 ' I n t e r p r e t a t e V o i c e C o m m a n d s C o m m a n d s 
 
 	 
 
 	 S h o w M o t o r F P S 
 
 	 P o s i t i o n D e l t a 
 
 	 E n c o d e r s 
 
 	 S t a t u s M a s t e r 
 
 	 F i r s t F i v e B u t t o n s 
 
 	 D e l t a 
 
 G o t o   L o o p 
 
 
 
 L a b e l   D e l t a 
 
 	 S l o t ( S l o t _ M 1 _ D e l t a B a s e )     =   S l o t ( S l o t _ M 1 _ d e s B a s e )   -   S l o t ( S l o t _ M 1 _ p o s B a s e ) 
 
 	 S l o t ( S l o t _ M 2 _ D e l t a I n n e r )   =   S l o t ( S l o t _ M 2 _ d e s I n n e r )   -   S l o t ( S l o t _ M 2 _ p o s I n n e r ) 
 
 	 S l o t ( S l o t _ M 3 _ D e l t a M i d d l e )   =   S l o t ( S l o t _ M 3 _ d e s M i d d l e )   -   S l o t ( S l o t _ M 3 _ p o s M i d d l e ) 
 
 	 S l o t ( S l o t _ M 4 _ D e l t a O u t e r )       =   S l o t ( S l o t _ M 4 _ d e s O u t e r )   -   S l o t ( S l o t _ M 4 _ p o s O u t e r ) 
 
 R e t u r n 
 
 
 
 L a b e l   T e s t T e m p 
 
 	 V a r i a b l e   N u m e r i c   T T 1 
 
 	 V a r i a b l e   N u m e r i c   T T 2   =   0 
 
 	 ' T T 2   =   0 
 
 	 F o r   T T 1   =   1   T o   5 
 
 	 	 T T 2   =   M a x ( T T 2 ,   S l o t ( T T 1   *   1 0 0   +   6 ) )                                               ' < < < < < < < < < < < < < < < < 
 
 	 N e x t 
 
 	 B u t t o n   M o t o r T e m p   T e x t   " M a x T   "   +   T T 2   +   "  C " 
 
 R e t u r n 
 
 
 
 '   T%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%W%
 
 '   Q%  M A S T E R   S T A T U S   Q U E R Y   Q%
 
 '   Z%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%]%
 
 L a b e l   S t a t u s M a s t e r 
 
 	 V a r i a b l e   S t r i n g   M a s t e r 
 
 	 I f   S l o t ( S l o t _ M a s t e r S t a t u s )   < >   1 0 0 0 
 
 	 	 M a s t e r   =   " O F F " 
 
 	 	 ' P r i n t   " M A S T E R   O F F     " 
 
 	 E l s e 
 
 	 	 M a s t e r   =   " O N " 
 
 	 	 ' P r i n t   " M A S T E R   O N     " 
 
 	 E n d I f 
 
 R e t u r n 
 
 
 
 '   T%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%W%
 
 '   Q%  E N A B L E / D I S A B L E   B U T T O N S                                           Q%
 
 '   Z%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%]%
 
 L a b e l   E n a b l e A l l B u t t o n s 
 
 	 F o r   v 1   =   1   T o   3 2 
 
 	 	 B u t t o n   v 1   E n a b l e d 
 
 	 N e x t 
 
 R e t u r n 
 
 
 
 L a b e l   D i s a b l e A l l B u t t o n s 
 
 	 F o r   v 1   =   1   T o   3 2 
 
 	 	 B u t t o n   v 1   D i s a b l e d 
 
 	 N e x t 
 
 R e t u r n 
 
 
 
 '   T%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%W%
 
 '   Q%    W A I T   C O B O T   R E A D Y                                                     Q%
 
 '   Z%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%]%
 
 L a b e l   W a i t C o b o t R e a d y 
 
 	 V a r i a b l e   N u m e r i c   W C R 1 
 
 	 F o r   W C R 1   =   1   T o   I n f i n i t y 
 
 	 	 W a i t   S e c o n d s   0 . 0 5 
 
 	 	 I f   S l o t T e x t ( S l o t _ R e s p o n s e s F r o m C o b o t )   =   " R e a d y " 
 
 	 	 	 E x i t 
 
 	 	 E n d I f 
 
 	 N e x t 
 
 R e t u r n 
 
 
 
 '   T%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%W%
 
 '   Q%    W A I T   A P P S   S T A R T E D                                                   Q%
 
 '   Z%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%]%
 
 L a b e l   W a i t A p p l i c a t i o n s S t a r t e d 
 
 	 S l o t ( S l o t _ M o t o r s F P S )   =   0 
 
 	 W a i t   S l o t ( S l o t _ M o t o r s F P S )   >   1 0 
 
 	 W a i t   S e c o n d s   0 . 1 
 
 R e t u r n 
 
 
 
 '   T%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%W%  %%%%  %%%%%  %%%%  %%%%
 
 '   Q%  S T O P   E V E N T   ( w h e n   p r e s s i n g   s t o p   b u t t o n )           Q%  %%%%      %      %    %  %%%%
 
 '   Z%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%]%  %%%%      %      %%%%  %
 
 L a b e l   E v e n t S t o p 
 
 	 S a f e 
 
 	 L o a d   C l o s e A p p s   " . . \ F i l e s \ W i F i _ c o n t r o l l e r _ b u t t o n s . t x t " 
 
 	 ' G o T o H o m e 
 
 	 ' S t o p C o b o t 
 
 	 S l o t ( S l o t _ S i g n a l S c o p e )   =   0 
 
 	 ' D e A c t i v a t e M o t o r s 
 
 E n d 
 
 
 
 '   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 '     S E N D   C O M M A N D   ( d e f a u l t   t i m e o u t   =   0 . 5   S e c ) 
 
 '   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 L a b e l   S e n d C o m m a n d 	 	 	 ' ( D e s t i n a t i o n   S l o t ) ( C o m m a n d   S t r i n g ) 
 
 	 V a r i a b l e   N u m e r i c   S C 1 
 
 	 V a r i a b l e   S t r i n g     S C 2 
 
 	 V a r i a b l e   N u m e r i c   S C 3   =   0 . 7   ' < - -   T h e   t i m e o u t   i n   s e c o n d s   w a s   0 . 5 
 
 	 V a r i a b l e   N u m e r i c   S C 4 
 
 	 S l o t T e x t   S C 1   =   S C 2 
 
 	 F o r   S C 4   =   0 . 1   T o   S C 3   S t e p   0 . 1 
 
 	 	 I f   S l o t T e x t ( S C 1 )   =   " " 
 
 	 	 	 E x i t 
 
 	 	 E n d I f 
 
 	 	 W a i t   S e c o n d s   0 . 1 
 
 	 N e x t 
 
 R e t u r n 
 
 
 
 ' T%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%W%
 
 ' Q%C O M M A N D S   T O   C O B O T Q%
 
 ' Z%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%]%
 
 '   %%%%  %%%%  %%  %%  %%  %%      %%%%%  %%%%      %%%%  %%%%  %%%    %%%%  %%%%%
 
 '   %        %    %  %  %  %  %  %  %          %      %    %      %        %    %  %%%%  %    %      %
 
 '   %%%%  %%%%  %      %  %      %  %      %      %%%%      %%%%  %%%%  %%%%  %%%%      %
 
 
 
 L a b e l   E x e c C o b o t 
 
 	 ' S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " D i s a b l e R e p e a t " ) 
 
 	 ' S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " E n a b l e R e p e a t " ) 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " S e l e c t L i n e   1 " ) 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " S t a r t E x e c u t i o n " ) 
 
 R e t u r n 
 
 
 
 L a b e l   S t o p C o b o t 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " S t o p E x e c u t i o n " ) 
 
 R e t u r n 
 
 
 
 L a b e l   A r r o w U p C o b o t 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " A r r o w U p " ) 
 
 R e t u r n 
 
 
 
 L a b e l   A r r o w D o w n C o b o t 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " A r r o w D o w n " ) 
 
 R e t u r n 
 
 
 
 L a b e l   E x e c u t e C o b o t F r o m S e l e c t e d L i n e 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " S t a r t E x e c u t i o n " ) 
 
 R e t u r n 
 
 
 
 L a b e l   U p d a t e C o b o t 
 
 	 I f   M a s t e r   =   " O F F "   
 
 	 	 R e t u r n 
 
 	 E n d I f 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " C o r r e c t S e l e c t e d P o s i t i o n " ) 
 
 R e t u r n 
 
 
 
 
 
 L a b e l   D e l e t e S e l e c t e d L i n e 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " D e l e t e S e l e c t e d L i n e " ) 
 
 R e t u r n 
 
 
 
 L a b e l   A d d N e w P o s i t i o n 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " A d d N e w P o s i t i o n " ) 
 
 R e t u r n 
 
 
 
 L a b e l   E n a b l e R e p e a t 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " E n a b l e R e p e a t " ) 
 
 R e t u r n 
 
 
 
 L a b e l   D i s a b l e R e p e a t 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " D i s a b l e R e p e a t " ) 
 
 R e t u r n 
 
 
 
 
 
 '   T%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%W%  %%%%  %    %  %%%
 
 '   Q%    S   U   B   R   O   U   T   I   N   E       A   R   E   A                       Q%  %%%%  %    %  %%%%
 
 '   Z%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%]%  %%%%  %%%%  %%%%
 
 L a b e l   E n a b l e H o m e B u t t o n s 
 
 	 F o r   v 1   =   1 7   T o   2 2 
 
 	 	 B u t t o n   v 1   E n a b l e d 
 
 	 N e x t 
 
 R e t u r n 
 
 
 
 L a b e l   D i s a b l e H o m e B u t t o n s 
 
 	 F o r   v 1   =   1 7   T o   2 2 
 
 	 	 B u t t o n   v 1   D i s a b l e d 
 
 	 N e x t 
 
 R e t u r n 
 
 
 
 L a b e l   C u r r e n t M e t e r 
 
 	 V a r i a b l e   N u m e r i c   m A 
 
 	 m A   =   S l o t ( 1 0 8 )   +   S l o t ( 2 0 8 )   +   S l o t   ( 3 0 8 )   +   S l o t   ( 4 0 8 )             ' +   S l o t   ( 5 0 8 )   +   S l o t   ( 6 0 8 )   +   S l o t   ( 7 0 8 ) 
 
 	 
 
 	 ' I f   m A   >   1 5 0 
 
 	 ' 	 B e e p   5 0 0   1 0 
 
 	 ' E n d I f 
 
 	 m A   =   F i l t e r L P ( m A ,   0 . 1 ,   1 )   ' < - -   F i l t e r   0 . 5   s e c o n d s   /   1   p o l e 
 
 	 B u t t o n   C u r r e n t M e t e r   T e x t   " C u r r e n t   "   +   S t r ( m A ,   " 0   m A " ) 
 
 R e t u r n 
 
 
 
 ' L a b e l   T o r q u e M e t e r 
 
 ' 	 V a r i a b l e   N u m e r i c   T M 1   =   0 
 
 ' 	 T M 1   =   M a x ( T M 1 , A b s ( S l o t ( 1 0 4 ) ) ) 
 
 ' 	 T M 1   =   M a x ( T M 1 , A b s ( S l o t ( 2 0 4 ) ) ) 
 
 ' 	 T M 1   =   M a x ( T M 1 , A b s ( S l o t ( 3 0 4 ) ) ) 
 
 ' 	 T M 1   =   M a x ( T M 1 , A b s ( S l o t ( 4 0 4 ) ) ) 
 
 ' 	 T M 1   =   M a x ( T M 1 , A b s ( S l o t ( 5 0 4 ) ) ) 
 
 ' 	 ' T M 1   =   F i l t e r L P ( T M 1 ,   0 . 1 ,   1 )   ' < - -   F i l t e r   0 . 5   s e c o n d s   /   1   p o l e 
 
 ' 	 I f   T M 1   =   2 0 0 
 
 ' 	 	 B e e p   1 0 0 0   1 0 0 
 
 ' 	 E n d I f 
 
 ' R e t u r n 
 
 
 
 L a b e l   S h o w M o t o r F P S 
 
 	 V a r i a b l e   S t r i n g   M o t o r s A r e E n a b l e d 
 
 	 V a r i a b l e   N u m e r i c   S M F 1   =   S l o t ( S l o t _ M o t o r s F P S ) 
 
 	 I f   S M F 1   >   3 0 
 
 	 	 I f   M o t o r s A r e E n a b l e d   < >   " T R U E " 
 
 	 	 	 M o t o r s A r e E n a b l e d   =   " T R U E " 
 
 	 	 	 B u t t o n   M o t o r F P S   C o l o r   G r e e n Y e l l o w 
 
 	 	 E n d I f 
 
 	 	 B u t t o n   M o t o r F P S   T e x t   " F P S   "   +   S t r ( S M F 1 ) 
 
 	 E l s e 
 
 	 	 I f   M o t o r s A r e E n a b l e d   =   " T R U E " 
 
 	 	 	 M o t o r s A r e E n a b l e d   =   " F A L S E " 
 
 	 	 	 B u t t o n   M o t o r F P S   C o l o r   F l a s h i n g 7   Y e l l o w   D a r k O r a n g e 
 
 	 	 	 B u t t o n   M o t o r F P S   T e x t   " N O   M O T O R S " 
 
 	 	 E n d I f 
 
 	 E n d I f 
 
 R e t u r n 
 
 
 
 ' L a b e l   M o t o r F P S 
 
 ' 	 I f   M o t o r s A r e E n a b l e d   =   " T R U E " 
 
 ' 	 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o M o t o r s ) ( " D i s a b l e C o n n e c t i o n " ) 
 
 ' 	 E l s e 
 
 ' 	 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o M o t o r s ) ( " E n a b l e C o n n e c t i o n " ) 
 
 ' 	 E n d I f 
 
 ' R e t u r n 
 
 
 
 L a b e l   P o s i t i o n D e l t a 
 
 	 S l o t ( S l o t _ M 1 _ D e l t a B a s e )   =   S l o t ( S l o t _ M 1 _ d e s B a s e )   -   S l o t ( S l o t _ M 1 _ p o s B a s e ) 
 
 	 S l o t ( S l o t _ M 2 _ D e l t a I n n e r )   =   S l o t ( S l o t _ M 2 _ d e s I n n e r )   -   S l o t ( S l o t _ M 2 _ p o s I n n e r ) 
 
 	 S l o t ( S l o t _ M 3 _ D e l t a M i d d l e )   =   S l o t ( S l o t _ M 3 _ d e s M i d d l e )   -   S l o t ( S l o t _ M 3 _ p o s M i d d l e ) 
 
 	 S l o t ( S l o t _ M 4 _ D e l t a O u t e r )   =   S l o t ( S l o t _ M 4 _ d e s O u t e r )   -   S l o t ( S l o t _ M 4 _ p o s O u t e r ) 
 
 R e t u r n 
 
 
 
 L a b e l   S c o p e s A c t i v e 
 
 	 I f   S l o t ( S l o t _ S i g n a l S c o p e )   <   1 0 0 0 
 
 	 	 B u t t o n   S c o p e s A c t i v e   T e x t   " S c o p e s   O N " 
 
 	 	 B u t t o n   S c o p e s A c t i v e   C o l o r   F l a s h i n g 8   O r a n g e R e d   M o c c a s i n 
 
 	 	 S l o t ( S l o t _ S i g n a l S c o p e )   =   1 0 0 0 
 
 	 E l s e 
 
 	 	 B u t t o n   S c o p e s A c t i v e   T e x t   " S c o p e s   O F F " 
 
 	 	 B u t t o n   S c o p e s A c t i v e   C o l o r   S k y B l u e 
 
 	 	 S l o t ( S l o t _ S i g n a l S c o p e )   =   0 
 
 	 E n d I f 
 
 R e t u r n 
 
 
 
 
 
 '   T%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%W%
 
 '   Q%    V   O   I   C   E                         Q%
 
 '   Z%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%]%
 
 V a r i a b l e   S t r i n g   V o i c e O u t p u t S t a t u s 
 
 L a b e l   S t a r t V o i c e 
 
 	 T T S   S e t V o l u m e   1 0 0 
 
 	 V o i c e O u t p u t S t a t u s   =   " " 
 
 	 V o i c e O u t p u t O n O f f 
 
 R e t u r n 
 
 
 
 L a b e l   S t o p V o i c e 
 
 	 T T S   S e t V o l u m e   0 
 
 	 V o i c e O u t p u t S t a t u s   =   " a c t i v e " 
 
 	 V o i c e O u t p u t O n O f f 
 
 R e t u r n 
 
 
 
 L a b e l   V o i c e O u t p u t O n O f f 
 
 	 I f   V o i c e O u t p u t S t a t u s   =   " a c t i v e " 
 
 	 	 V o i c e O u t p u t S t a t u s   =   " " 
 
 	 	 B u t t o n   V o i c e O u t p u t O n O f f   T e x t   " V o i c e   O F F " 
 
 	 	 B u t t o n   V o i c e O u t p u t O n O f f   C o l o r   D a r k S l a t e G r a y 
 
 	 	 T T S   S e t V o l u m e   0 
 
 	 E l s e 
 
 	 	 V o i c e O u t p u t S t a t u s   =   " a c t i v e " 
 
 	 	 B u t t o n   V o i c e O u t p u t O n O f f   T e x t   " V o i c e   O N " 
 
 	 	 B u t t o n   V o i c e O u t p u t O n O f f   C o l o r   L i m e 
 
 	 	 T T S   S e t V o l u m e   1 0 0 
 
 	 E n d I f 
 
 R e t u r n 
 
 
 
 
 
 
 
 '   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
 L a b e l   S a f e 
 
 	 S l o t ( S l o t _ M 1 _ d e s B a s e )       =   1 8 0 
 
 	 S l o t ( S l o t _ M 2 _ d e s I n n e r )     =   2 7 0 
 
 	 S l o t ( S l o t _ M 3 _ d e s M i d d l e )   =     6 0 
 
 	 S l o t ( S l o t _ M 4 _ d e s O u t e r )     =     9 0 
 
 	 
 
 ' 	 R e c o g n i z e E n c o d e r 
 
 	 T T S   S p e a k   " S t a r t   S a f e   j o b " 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " D i s a b l e R e p e a t " ) 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " L o a d S e q u e n c e   T W i n G o _ S a f e . t x t " ) 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " S e l e c t L i n e   1 " ) 
 
 	 ' S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " S t a r t E x e c u t i o n " ) 
 
 R e t u r n 
 
 R e t u r n 
 
 
 
 L a b e l   S e t 1 7 0 
 
 	 S l o t ( S l o t _ M 1 _ d e s B a s e )       =   1 7 0 
 
 	 S l o t ( S l o t _ M 2 _ d e s I n n e r )     =   1 7 0 
 
 	 S l o t ( S l o t _ M 3 _ d e s M i d d l e )   =   1 7 0 
 
 	 S l o t ( S l o t _ M 4 _ d e s O u t e r )     =   1 7 0 
 
 	 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " D i s a b l e R e p e a t " ) 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " L o a d S e q u e n c e   T W i n G o _ S e t 1 7 0 . t x t " ) 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " S e l e c t L i n e   1 " ) 
 
 	 ' S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " S t a r t E x e c u t i o n " ) 
 
 R e t u r n 
 
 
 
 
 
 
 
 '   T%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%W%  %%  %%  %%%%  %%%%%  %%%%  %%%%
 
 '   Q%  M o v e   M o t o r   ( M o t N u m ) ( D e s t ) ( W a i t   s e c o n d s ) Q%  %  %  %  %    %      %      %    %  %%%%
 
 '   Z%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%]%  %      %  %%%%      %      %%%%  %  %%
 
 L a b e l   G o T o H o m e 
 
 	 ' R e c o g n i z e E n c o d e r 
 
 	 T T S   S p e a k   " G o t o   H o m e . " 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " D i s a b l e R e p e a t " ) 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " L o a d S e q u e n c e   T W i n G o _ H o m e . t x t " ) 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " S e l e c t L i n e   1 " ) 
 
 	 ' S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " S t a r t E x e c u t i o n " ) 
 
 R e t u r n 
 
 
 
 
 
 
 
 L a b e l   S e a S u n 
 
 ' 	 R e c o g n i z e E n c o d e r 
 
 	 T T S   S p e a k   " S t a r t   d e m o   f o r   S e a S u n " 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " D i s a b l e R e p e a t " ) 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " L o a d S e q u e n c e   T W i n G o _ S e a S u n . t x t " ) 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " S e l e c t L i n e   1 " ) 
 
 	 ' S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " S t a r t E x e c u t i o n " ) 
 
 R e t u r n 
 
 
 
 L a b e l   P h o n e 
 
 ' 	 R e c o g n i z e E n c o d e r 
 
 	 T T S   S p e a k   " S t a r t   d e m o   f o r   P h o n e " 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " D i s a b l e R e p e a t " ) 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " L o a d S e q u e n c e   T W i n G o _ P h o n e . t x t " ) 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " S e l e c t L i n e   1 " ) 
 
 	 ' S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " S t a r t E x e c u t i o n " ) 
 
 R e t u r n 
 
 
 
 L a b e l   N e e d l e s 
 
 ' 	 R e c o g n i z e E n c o d e r 
 
 	 T T S   S p e a k   " S t a r t   e x e c u t i o n   o f   N e e d l e s " 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " D i s a b l e R e p e a t " ) 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " L o a d S e q u e n c e   T W i n G o _ N e e d l e s . t x t " ) 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " S e l e c t L i n e   1 " ) 
 
 	 ' S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " S t a r t E x e c u t i o n " ) 
 
 R e t u r n 
 
 
 
 L a b e l   T W i n G o T e s t 
 
 ' 	 R e c o g n i z e E n c o d e r 
 
 	 T T S   S p e a k   " S t a r t   e x e c u t i o n   o f   a   t e s t " 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " D i s a b l e R e p e a t " ) 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " L o a d S e q u e n c e   T W i n G o _ T e s t . t x t " ) 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " S e l e c t L i n e   1 " ) 
 
 	 ' S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " S t a r t E x e c u t i o n " ) 
 
 R e t u r n 
 
 
 
 L a b e l   T u n i n g 
 
 ' 	 R e c o g n i z e E n c o d e r 
 
 	 T T S   S p e a k   " E x e c u t i n g   T u n i n g " 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " D i s a b l e R e p e a t " ) 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " L o a d S e q u e n c e   T W i n G o _ t u n i n g . t x t " ) 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " S e l e c t L i n e   1 " ) 
 
 	 ' S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " S t a r t E x e c u t i o n " ) 
 
 R e t u r n 
 
 
 
 
 
 L a b e l   S a f e P o s i t i o n 
 
 ' 	 R e c o g n i z e E n c o d e r 
 
 	 T T S   S p e a k   " E x e c u t i n g   T u n i n g " 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " D i s a b l e R e p e a t " ) 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " L o a d S e q u e n c e   T W i n G o _ S a f e P o s i t i o n . t x t " ) 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " S e l e c t L i n e   1 " ) 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " S t a r t E x e c u t i o n " ) 
 
 R e t u r n 
 
 
 
 '   = = = = = = = = = = = =   N I C E   B O X   = = = = = = = = = = = = = = 
 
 '   T%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%W%  %%%%      %%%        %%%    %    %  %%%%%  %%%%%  %%%%  %%  %  %%%%
 
 '   Q%  F I R S T   F I V E   P U S H   B U T T O N S   Q%  %%%        %%%        %%%%  %    %      %          %      %    %  %  %%  %%%%
 
 '   Z%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%]%  %    %      %%%        %%%%  %%%%      %          %      %%%%  %    %  %%%%
 
 ' 
 
 '   * * * * * * * * * * * *   W A L M A R T   B O X   Y E L L O W   B U T T O N S   * * * * * * * * * * * 
 
 '   9 9 9 ,   3 6 8 ,   1 8 4 ,   1 0 6 ,   4 9 ,   1 5     t h e s e   a r e   A D C   v a l u e s 
 
 '   ( 9 9 9 + 3 6 8 ) / 2   =   6 8 3 
 
 '   ( 3 6 8 + 1 8 4 ) / 2   =   2 7 6 
 
 '   ( 1 8 4 + 1 0 6 ) / 2   =   1 4 5 
 
 '   ( 1 0 6 +   4 9 ) / 2   =   7 7 
 
 '   (   4 9 +   1 5 ) / 2   =   2 7 
 
 ' * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 
 
 '   = = = = = = = = = = = =   N I C E   B O X   Y E L L O W   B U T T O N S   = = = = = = = = = = = = = = 
 
 '   9 9 9 ,   3 4 1 ,   1 6 1 ,   8 5 ,   2 9 ,   0     A D C   v a l u e s   f r o m   H A L 
 
 '   ( 9 9 9 + 3 4 1 ) / 2   =   6 7 0 
 
 '   ( 3 4 1 + 1 6 1 ) / 2   =   2 5 1 
 
 '   ( 1 6 1 + 8 5 ) / 2   =   1 2 3 
 
 '   ( 8 5 + 2 9 ) / 2   =   5 7 
 
 '   ( 2 9 + 0 ) / 2   =   1 4 
 
 ' = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 
 
 V a r i a b l e   S t r i n g   P r e s s e d B u t t o n 
 
 L a b e l   F i r s t F i v e B u t t o n s 
 
 	 V a r i a b l e   N u m e r i c   F F B 0 
 
 	 V a r i a b l e   N u m e r i c   F F B 1 
 
 	 V a r i a b l e   N u m e r i c   F F B 2 
 
 	 ' '   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   c h e c k   t h e   p r e s e n c e   o f   t h e   M a s t e r 
 
 	 I f   S l o t ( S l o t _ M a s t e r S t a t u s )   < >   1 0 0 0 
 
 	 	 R e t u r n 
 
 	 E n d I f 
 
 	 '   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   R e a d   t h e   v a l u e   t w o   t i m e s 
 
 	 F F B 1   =   S l o t ( S l o t _ F i r s t F i v e B u t t o n ) 
 
 	 '   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   I f   s i m i l a r   v a l u e s 
 
 	 I f   A b s ( F F B 2   -   F F B 1 )   <   1 0 
 
 	 	 '   - - - - - - - - - - - - - - - - - - - - - - - - - -   I f   a r m e d 
 
 	 	 I f   F F B 0   =   0 
 
 	 	 	 F F B 0   =   1 
 
 	 	 	 S e l e c t   T r u e 
 
 	 	 	 	 C a s e   F F B 1   >   6 7 0 
 
 	 	 	 	 	 ' P r i n t   " " 
 
 	 	 	 	 	 P r e s s e d B u t t o n   =   " " 
 
 	 	 	 	 C a s e   F F B 1   >   2 5 1 
 
 	 	 	 	 	 ' P r i n t   "   B e g i n   " 
 
 	 	 	 	 	 P r e s s e d B u t t o n   =   " B e g i n " 
 
 	 	 	 	 	 E x e c C o b o t 
 
 	 	 	 	 C a s e   F F B 1   >   1 2 3 
 
 	 	 	 	 	 ' P r i n t   "   E x e c   f r o m   l i n e   " 
 
 	 	 	 	 	 P r e s s e d B u t t o n   =   " E x e c   f r o m   l i n e " 
 
 	 	 	 	 	 E x e c u t e C o b o t F r o m S e l e c t e d L i n e 
 
 	 	 	 	 C a s e   F F B 1   >   5 7 
 
 	 	 	 	 	 ' P r i n t   "   A r r o w   u p   " 
 
 	 	 	 	 	 P r e s s e d B u t t o n   =   " U p " 
 
 	 	 	 	 	 A r r o w U p C o b o t 
 
 	 	 	 	 C a s e   F F B 1   >   1 4 
 
 	 	 	 	 	 ' P r i n t   "   A r r o w   d o w n   " 
 
 	 	 	 	 	 P r e s s e d B u t t o n   =   " D o w n " 
 
 	 	 	 	 	 A r r o w D o w n C o b o t 
 
 	 	 	 	 C a s e E l s e 
 
 	 	 	 	 	 ' P r i n t   "   A r r o w   i n s i d e   " 
 
 	 	 	 	 	 P r e s s e d B u t t o n   =   " I n s i d e " 
 
 	 	 	 	 	 V o i c e O u t p u t O n O f f 
 
 	 	 	 E n d S e l e c t 
 
 	 	 E n d I f 
 
 	 E n d I f 
 
 	 F F B 2   =   F F B 1 
 
         '   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   R e a r m   b u t t o n s 
 
 	 I f   F F B 1   >   7 0 0 
 
 	 	 F F B 0   =   0 
 
 	 E n d I f 
 
 	 S e c o n d F i v e B u t t o n s 
 
 R e t u r n 
 
 
 
 '   = = = = = = = = = = = =   N I C E   B O X   C O L O R E D   B U T T O N S   = = = = = = = = = = = = = = 
 
 '   T%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%W%  %%%%        %%%        %%%    %    %  %%%%%  %%%%%  %%%%  %%  %  %%%%
 
 '   Q%  S E C O N D   F I V E   P U S H   B U T T O N S   Q%  %%%%        %%%        %%%%  %    %      %          %      %    %  %  %%  %%%%
 
 '   Z%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%]%  %%%%  %    %%%        %%%%  %%%%      %          %      %%%%  %    %  %%%%
 
 '   = = = = = = = = = = = =   N I C E   B O X   C O L O R E D   B U T T O N S   = = = = = = = = = = = = = = 
 
 '   9 9 6 ,   3 4 1 ,   1 6 1 ,   8 5 ,   2 9 ,   0     A D C   v a l u e s   f r o m   H A L 
 
 '   ( 9 9 6 + 3 4 1 ) / 2   =   6 2 8 
 
 '   ( 3 4 1 + 1 6 1 ) / 2   =   2 5 1 
 
 '   ( 1 6 1 + 8 5 ) / 2   =   1 2 3 
 
 '   ( 8 5 + 2 9 ) / 2   =   5 7 
 
 '   ( 2 9 + 0 ) / 2   =   1 4 
 
 ' = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 
 
 
 
 
 
 L a b e l   S e c o n d F i v e B u t t o n s 
 
 	 V a r i a b l e   N u m e r i c   S F B 0 
 
 	 V a r i a b l e   N u m e r i c   S F B 1 
 
 	 V a r i a b l e   N u m e r i c   S F B 2 
 
 	 ' '   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   c h e c k   t h e   p r e s e n c e   o f   t h e   M a s t e r 
 
 	 I f   S l o t ( S l o t _ M a s t e r S t a t u s )   < >   1 0 0 0 
 
 	 	 R e t u r n 
 
 	 E n d I f 
 
 	 '   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   R e a d   t h e   v a l u e   t w o   t i m e s 
 
 	 S F B 1   =   S l o t ( S l o t _ S e c o n d F i v e B u t t o n ) 
 
 	 
 
 	 '   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   I f   s i m i l a r   v a l u e s 
 
 	 I f   A b s ( S F B 2   -   S F B 1 )   <   1 0 
 
 	 	 '   - - - - - - - - - - - - - - - - - - - - - - - - - -   I f   a r m e d 
 
 	 	 I f   S F B 0   =   0 
 
 	 	 	 S F B 0   =   1 
 
 	 	 	 S e l e c t   T r u e 
 
 	 	 	 	 C a s e   S F B 1   >   6 2 8 
 
 	 	 	 	 	 ' P r i n t   " " 
 
 	 	 	 	 	 P r e s s e d B u t t o n   =   " " 
 
 	 	 	 	 	 E n c o d e r S p e e d   =   " " 
 
 	 	 	 	 C a s e   S F B 1   >   2 5 1 
 
 	 	 	 	 	 ' P r i n t   "   r e d   " 
 
 	 	 	 	 	 P r e s s e d B u t t o n   =   " r e d " 
 
 	 	 	 	 	 E n c o d e r S p e e d   =   " h i g h " 
 
 	 	 	 	 C a s e   S F B 1   >   1 2 3 
 
 	 	 	 	 	 ' P r i n t   "   g r e e n   " 
 
 	 	 	 	 	 P r e s s e d B u t t o n   =   " g r e e n " 
 
 	 	 	 	 	 E n c o d e r S p e e d   =   " l o w " 
 
 	 	 	 	 C a s e   S F B 1   >   5 7 
 
 	 	 	 	 	 ' P r i n t   "   b l a c k   " 
 
 	 	 	 	 	 P r e s s e d B u t t o n   =   " b l a c k " 
 
 	 	 	 	 	 D e l e t e S e l e c t e d L i n e 
 
 	 	 	 	 C a s e   S F B 1   >   1 4 
 
 	 	 	 	 	 ' P r i n t   "   y e l l o w   " 
 
 	 	 	 	 	 P r e s s e d B u t t o n   =   " y e l l o w " 
 
 	 	 	 	 	 A d d N e w P o s i t i o n 
 
 	 	 	 	 C a s e E l s e 
 
 	 	 	 	 	 ' P r i n t   "   b l u e   " 
 
 	 	 	 	 	 P r e s s e d B u t t o n   =   " b l u e " 
 
 	 	 	 	 	 R e p e a t O n O f f 
 
 	 	 	 E n d S e l e c t 
 
 	 	 E n d I f 
 
 	 E n d I f 
 
 	 S F B 2   =   S F B 1 
 
         '   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   R e a r m   b u t t o n s 
 
 	 I f   S F B 1   >   7 0 0 
 
 	 	 S F B 0   =   0 
 
 	 E n d I f 
 
 R e t u r n 
 
 
 
 L a b e l     R e c o n n e c t M a s t e r 
 
 	 S l o t ( 0 )   =   R e c o g n i z e 
 
 R e t u r n 
 
 
 
 '   T%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%W%  %%%%  %%  %  %%%%  %%%%  %%%%  %%%%  %%%%  %%%%
 
 '   Q%  E N C O D E R S   U S B   o r     W i - F i   Q%  %%%    %  %%  %        %    %  %    %  %%%    %%%%  %%%%
 
 '   Z%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%]%  %%%%  %    %  %%%%  %%%%  %%%%  %%%%  %  %%  %%%%
 
 V a r i a b l e   N u m e r i c   E n c o d e r S t e p s 1 
 
 V a r i a b l e   N u m e r i c   O l d E n c o d e r S t e p s 1   =   S l o t ( S l o t _ E n c o d e r 1 ) 
 
 V a r i a b l e   N u m e r i c   D i f f e r e n c e 1 
 
 V a r i a b l e   N u m e r i c   E n c o d e r S t e p s 2 
 
 V a r i a b l e   N u m e r i c   O l d E n c o d e r S t e p s 2   =   S l o t ( S l o t _ E n c o d e r 2 ) 
 
 V a r i a b l e   N u m e r i c   D i f f e r e n c e 2 
 
 V a r i a b l e   N u m e r i c   E n c o d e r S t e p s 3 
 
 V a r i a b l e   N u m e r i c   O l d E n c o d e r S t e p s 3   =   S l o t ( S l o t _ E n c o d e r 3 ) 
 
 V a r i a b l e   N u m e r i c   D i f f e r e n c e 3 
 
 V a r i a b l e   N u m e r i c   E n c o d e r S t e p s 4 
 
 V a r i a b l e   N u m e r i c   O l d E n c o d e r S t e p s 4   =   S l o t ( S l o t _ E n c o d e r 4 ) 
 
 V a r i a b l e   N u m e r i c   D i f f e r e n c e 4 
 
 ' 
 
 ' ' L a b e l   R e c o g n i z e E n c o d e r 
 
 ' ' 	 S l o t ( 0 )   =   R e c o g n i z e 
 
 ' ' R e t u r n 
 
 
 
 V a r i a b l e   S t r i n g   " E n c o d e r S p e e d "   =   " " 
 
 L a b e l   E n c o d e r s 
 
 	 ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   E n c o d e r   B A S E 
 
 	 E n c o d e r S t e p s 1   =   S l o t ( S l o t _ E n c o d e r 1 )   /   4 
 
 	 D i f f e r e n c e 1   =   E n c o d e r S t e p s 1   -   O l d E n c o d e r S t e p s 1 
 
 	 O l d E n c o d e r S t e p s 1   =   E n c o d e r S t e p s 1 
 
 	 I f   D i f f e r e n c e 1   >   3 2 0 0 0   /   4 
 
 	 	 D i f f e r e n c e 1   =   D i f f e r e n c e 1   -   6 5 5 3 6   /   4 
 
 	 E n d I f 
 
 	 I f   D i f f e r e n c e 1   <   - 3 2 0 0 0   /   4 
 
 	 	 D i f f e r e n c e 1   =   D i f f e r e n c e 1   +   6 5 5 3 6   /   4 
 
 	 E n d I f 
 
 	 D i f f e r e n c e 1   =   D i f f e r e n c e 1   *   1               ' d e f a u l t   s p e e d 
 
 	 I f   E n c o d e r S p e e d     =   " l o w " 
 
 	 	 D i f f e r e n c e 1   =   D i f f e r e n c e 1   /   4 
 
 	 E n d I f 
 
 	 I f   E n c o d e r S p e e d   =   " h i g h " 
 
 	 	 D i f f e r e n c e 1   =   D i f f e r e n c e 1   *   2 
 
 	 E n d I f 
 
 	 W r i t e S l o t M i n M a x ( S l o t _ M 1 _ d e s B a s e ) ( D i f f e r e n c e 1 ) ( S l o t _ M 1 _ M i n ) ( S l o t _ M 1 _ M a x ) 
 
 	 
 
         ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   E n c o d e r   I n n e r 
 
 	 E n c o d e r S t e p s 2   =   S l o t ( S l o t _ E n c o d e r 2 )   /   4 
 
 	 D i f f e r e n c e 2   =   E n c o d e r S t e p s 2   -   O l d E n c o d e r S t e p s 2 
 
 	 O l d E n c o d e r S t e p s 2   =   E n c o d e r S t e p s 2 
 
 	 I f   D i f f e r e n c e 2   >   3 2 0 0 0   /   4 
 
 	 	 D i f f e r e n c e 2   =   D i f f e r e n c e 2   -   6 5 5 3 6   /   4 
 
 	 E n d I f 
 
 	 I f   D i f f e r e n c e 2   <   - 3 2 0 0 0   /   4 
 
 	 	 D i f f e r e n c e 2   =   D i f f e r e n c e 2   +   6 5 5 3 6   /   4 
 
 	 E n d I f 
 
 	 D i f f e r e n c e 2   =   D i f f e r e n c e 2   *   1 
 
 	 I f   E n c o d e r S p e e d     =   " l o w " 
 
 	 	 D i f f e r e n c e 2   =   D i f f e r e n c e 2   /   4 
 
 	 E n d I f 
 
 	 I f   E n c o d e r S p e e d     =   " h i g h " 
 
 	 	 D i f f e r e n c e 2   =   D i f f e r e n c e 2   *   2 
 
 	 E n d I f 
 
 	 W r i t e S l o t M i n M a x ( S l o t _ M 2 _ d e s I n n e r ) ( D i f f e r e n c e 2 ) ( S l o t _ M 2 _ M i n ) ( S l o t _ M 2 _ M a x ) 
 
 	 
 
         ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   E n c o d e r   O u t e r 
 
 	 E n c o d e r S t e p s 3   =   S l o t ( S l o t _ E n c o d e r 3 )   /   4 
 
 	 D i f f e r e n c e 3   =   E n c o d e r S t e p s 3   -   O l d E n c o d e r S t e p s 3 
 
 	 O l d E n c o d e r S t e p s 3   =   E n c o d e r S t e p s 3 
 
 	 I f   D i f f e r e n c e 3   >   3 2 0 0 0   /   4 
 
 	 	 D i f f e r e n c e 3   =   D i f f e r e n c e 3   -   6 5 5 3 6   /   4 
 
 	 E n d I f 
 
 	 I f   D i f f e r e n c e 3   <   - 3 2 0 0 0   /   4 
 
 	 	 D i f f e r e n c e 3   =   D i f f e r e n c e 3   +   6 5 5 3 6   /   4 
 
 	 E n d I f 
 
 	 D i f f e r e n c e 3   =   D i f f e r e n c e 3   *   1 
 
 	 I f   E n c o d e r S p e e d     =   " l o w " 
 
 	 	 D i f f e r e n c e 3   =   D i f f e r e n c e 3   /   4 
 
 	 E n d I f 
 
 	 I f   E n c o d e r S p e e d     =   " h i g h " 
 
 	 	 D i f f e r e n c e 3   =   D i f f e r e n c e 3   *   2 
 
 	 E n d I f 
 
 	 W r i t e S l o t M i n M a x ( S l o t _ M 3 _ d e s M i d d l e ) ( D i f f e r e n c e 3 ) ( S l o t _ M 3 _ M i n ) ( S l o t _ M 3 _ M a x ) 
 
 	 
 
 	 ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   E n c o d e r   e n d 
 
 	 E n c o d e r S t e p s 4   =   S l o t ( S l o t _ E n c o d e r 4 )   /   4 
 
 	 D i f f e r e n c e 4   =   E n c o d e r S t e p s 4   -   O l d E n c o d e r S t e p s 4 
 
 	 O l d E n c o d e r S t e p s 4   =   E n c o d e r S t e p s 4 
 
 	 I f   D i f f e r e n c e 4   >   3 2 0 0 0   /   4 
 
 	 	 D i f f e r e n c e 4   =   D i f f e r e n c e 4   -   6 5 5 3 6   /   4 
 
 	 E n d I f 
 
 	 I f   D i f f e r e n c e 4   <   - 3 2 0 0 0   /   4 
 
 	 	 D i f f e r e n c e 4   =   D i f f e r e n c e 4   +   6 5 5 3 6   /   4 
 
 	 E n d I f 
 
 	 D i f f e r e n c e 4   =   D i f f e r e n c e 4   *   1 
 
 	 I f   E n c o d e r S p e e d     =   " l o w " 
 
 	 	 D i f f e r e n c e 4   =   D i f f e r e n c e 4   /   4 
 
 	 E n d I f 
 
 	 I f   E n c o d e r S p e e d     =   " h i g h " 
 
 	 	 D i f f e r e n c e 4   =   D i f f e r e n c e 4   *   2 
 
 	 E n d I f 
 
 	 W r i t e S l o t M i n M a x ( S l o t _ M 4 _ d e s O u t e r ) ( D i f f e r e n c e 4 ) ( S l o t _ M 4 _ M i n ) ( S l o t _ M 4 _ M a x ) 
 
 	 
 
 	 	 ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
 	 I f   D i f f e r e n c e 1   < >   0   O r   D i f f e r e n c e 2   < >   0   O r   D i f f e r e n c e 3   < >   0   O r   D i f f e r e n c e 4   < >   0 
 
 	 	 U p d a t e C o b o t 
 
 	 	 ' S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " S e t T o r q u e M i n   3 3 3 " ) 
 
 	 	 ' S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " S e t T o r q u e M a x   5 5 5 " ) 
 
 	 E n d I f 
 
 R e t u r n 
 
 
 
 L a b e l   R e s e t E n c o d e r s 
 
 	 O l d E n c o d e r S t e p s 1   =   S l o t ( S l o t _ E n c o d e r 1 )   /   4 
 
 	 O l d E n c o d e r S t e p s 2   =   S l o t ( S l o t _ E n c o d e r 2 )   /   4 
 
 	 O l d E n c o d e r S t e p s 3   =   S l o t ( S l o t _ E n c o d e r 3 )   /   4 
 
 	 O l d E n c o d e r S t e p s 4   =   S l o t ( S l o t _ E n c o d e r 4 )   /   4 
 
 R e t u r n 
 
 
 
 L a b e l   W r i t e S l o t M i n M a x 
 
 	 V a r i a b l e   N u m e r i c   W S S l o t 
 
 	 V a r i a b l e   N u m e r i c   W S d i f f 
 
 	 V a r i a b l e   N u m e r i c   W S M i n 
 
 	 V a r i a b l e   N u m e r i c   W S M a x 
 
 	 W S d i f f   =   S l o t ( W S S l o t )   +   W S d i f f 
 
 	 I f   W S d i f f   >   W S M a x 
 
 	 	 W S d i f f   =   W S M a x 
 
 	 	 B e e p ( 3 0 , 1 0 ) 
 
 	 E n d I f 
 
 	 I f   W S d i f f   <   W S M i n 
 
 	 	 W S d i f f   =   W S M i n 
 
 	 	 B e e p ( 3 0 , 1 0 ) 
 
 	 E n d I f 
 
 	 S l o t ( W S S l o t )   =   W S d i f f 
 
 R e t u r n 
 
 
 
 
 
 '   T%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%W%  %%%%  %%%%  %%%%  %%%%  %%%%  %%%%%
 
 '   Q%    R E P E A T   O N - O F F                 Q%  %%%%  %%%    %%%%  %%%    %%%%      %
 
 '   Z%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%]%  %  %%  %%%%  %        %%%%  %    %      %
 
 V a r i a b l e   S t r i n g   R e p e a t S t a t u s   =   " R e p e a t   O f f " 
 
 L a b e l   R e p e a t O n O f f 
 
 	 I f   R e p e a t S t a t u s   =   " R e p e a t   O f f " 
 
 	 	 R e p e a t S t a t u s   =   " R e p e a t   O n " 
 
 	 	 E n a b l e R e p e a t 
 
 	 	 T T S   S p e a k   R e p e a t S t a t u s 
 
 	 	 B u t t o n   R e p e a t O n O f f   T e x t   " R E P E A T   O N " 
 
 	 	 B u t t o n   R e p e a t O n O f f   C o l o r   F l a s h i n g 7   Y e l l o w   R e d 
 
 	 E l s e 
 
 	 	 D i s a b l e R e p e a t 
 
 	 	 R e p e a t S t a t u s   =   " R e p e a t   O f f " 
 
 	 	 T T S   S p e a k   R e p e a t S t a t u s 
 
 	 	 B u t t o n   R e p e a t O n O f f   T e x t   " R E P E A T   O F F " 
 
 	 	 B u t t o n   R e p e a t O n O f f   C o l o r   D a r k S l a t e G r a y 
 
 	 E n d I f 
 
 R e t u r n 
 
 
 
 V a r i a b l e   S t r i n g   B u t t o n M e a n i n g S t a t u s   =   " D i s p l a y   O f f " 
 
 L a b e l   B u t t o n M e a n i n g 
 
 	 I f   B u t t o n M e a n i n g S t a t u s   =   " D i s p l a y   O F F " 
 
 	 	 B u t t o n M e a n i n g S t a t u s   =   " D i s p l a y   O N " 
 
 	 	 L o a d   i m a g e s \ B u t t o n _ m e a n i n g s . p n g 
 
 	 	 ' T T S   S p e a k   R e p e a t S t a t u s 
 
 	 	 B u t t o n   B u t t o n M e a n i n g   T e x t   " M e a n i n g   O N " 
 
 	 E l s e 
 
 	 	 L o a d   H i d e 
 
 	 	 B u t t o n M e a n i n g S t a t u s   =   " D i s p l a y   O F F " 
 
 	 	 ' T T S   S p e a k   R e p e a t S t a t u s 
 
 	 	 B u t t o n   B u t t o n M e a n i n g   T e x t   " M e a n i n g   O F F " 
 
 	 E n d I f 
 
 R e t u r n 
 
 
 
 
 
 
 
 '   T%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%W%  %%%%  %%%  %%%%  %%%%  %%%  %%%%
 
 '   Q%    S   C   O   P   E   S                             Q%  %%%%  %      %    %  %%%%  %%%  %%%%
 
 '   Z%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%]%  %%%%  %%%  %%%%  %        %%%  %%%%
 
 L a b e l   C l o s e S c o p e s 
 
 	 L o a d   C l o s e A p p s   T h e r e m i n o _ S i g n a l S c o p e _ M 1 . e x e 
 
 	 L o a d   C l o s e A p p s   T h e r e m i n o _ S i g n a l S c o p e _ M 2 . e x e 
 
 	 L o a d   C l o s e A p p s   T h e r e m i n o _ S i g n a l S c o p e _ M 3 . e x e 
 
 	 L o a d   C l o s e A p p s   T h e r e m i n o _ S i g n a l S c o p e _ M 4 . e x e 
 
 	 L o a d   C l o s e A p p s   T h e r e m i n o _ S i g n a l S c o p e _ F P S . e x e 
 
 R e t u r n 
 
 
 
 L a b e l   O p e n S c o p e s 
 
 	 L o a d   T h e r e m i n o _ S i g n a l S c o p e _ M 1 . e x e 
 
 	 L o a d   T h e r e m i n o _ S i g n a l S c o p e _ M 2 . e x e 
 
 	 L o a d   T h e r e m i n o _ S i g n a l S c o p e _ M 3 . e x e 
 
 	 L o a d   T h e r e m i n o _ S i g n a l S c o p e _ M 4 . e x e 
 
 R e t u r n 
 
 
 
 L a b e l   O p e n S c o p e _ F P S 
 
 	 L o a d   T h e r e m i n o _ S i g n a l S c o p e _ F P S . e x e 
 
 R e t u r n 
 
 
 
 L a b e l   S t a r t S c o p e 
 
 	 S l o t ( S l o t _ S i g n a l S c o p e )   =   1 0 0 0 
 
 R e t u r n 
 
 
 
 L a b e l   S t o p S c o p e 
 
 	 S l o t ( S l o t _ S i g n a l S c o p e )   =   0 
 
 R e t u r n 
 
 
 
 '   T%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%W%  %%%%  %%%  %%%%  %      %  %%%%
 
 '   Q%    S   E   R   V   O                                 Q%  %%%%  %%%  %%%%  %      %  %    %
 
 '   Z%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%]%  %%%%  %%%  %  %%    %%%    %%%%
 
 L a b e l   C l e a r C o m m a n d 
 
 	 S l o t T e x t ( S l o t _ E x t e r n a l C o m m a n d s )   =   " " 
 
 R e t u r n 
 
 
 
 V a r i a b l e   N u m e r i c   S t a r t T i m e 
 
 V a r i a b l e   N u m e r i c   S t a r t T i m e P a r t i a l 
 
 V a r i a b l e   S t r i n g   T i m e 
 
 L a b e l   P r i n t T i m e 
 
 	 T i m e   =   " P a r t i a l   t i m e   =   " 
 
 	 T i m e   =   T i m e   +   P a d L e f t ( F o r m a t ( E l a p s e d T i m e   -   S t a r t T i m e P a r t i a l ,   " 0 . 0 " ) , 4 ) 
 
 	 T i m e   =   T i m e   +   "       T o t a l   t i m e   =   " 
 
 	 T i m e   =   T i m e   +   P a d L e f t ( F o r m a t ( E l a p s e d T i m e   -   S t a r t T i m e ,   " 0 . 0 " ) , 4 ) 
 
 	 ' P r i n t   S t a t u s   +   "     "   +   T i m e   +   C R L F 
 
 R e t u r n 
 
 
 
 '   T%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%W%  %%%%  %%%%  %%  %%
 
 '   Q%    S A Y                                                                               Q%  %%%%  %%%%    %%%
 
 '   Z%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%]%  %%%%  %    %      %
 
 L a b e l   S a y 
 
 	 T T S   S e l e c t V o i c e   " E N G F " 
 
 	 T T S   S p e a k   " T o d a y   i s   a   b e a u t i f u l   d a y   b e c a u s e   w e   s p e n d   t i m e   t o g e t h e r . " 
 
 	 W a i t   T T S r e a d y 
 
 	 
 
 	 T T S   S e l e c t V o i c e   " I T A   F E M " 
 
 	 T T S   S p e a k   " O g g i      u n a   b e l l a   g i o r n a t a   p e r c h e   p a s s e r e m o   d e l   t e m p o   i n s i e m e . " 
 
 	 W a i t   T T S r e a d y 
 
 	 
 
 	 T T S   S e l e c t V o i c e   " J P N " 
 
 	 T T S   S p e a k   " y_0a0o0 N}k0Bf0NT0Y0n0g00Neo0W0D0eg0Y00" 
 
 	 W a i t   T T S r e a d y 
 
 	 
 
 	 T T S   S e l e c t V o i c e   " Z H O " 
 
 	 T T S   S p e a k   " N)Y/f}Yv N)YV:NbNqQ^eIQ0" 
 
 	 W a i t   T T S r e a d y 
 
 R e t u r n 
 
 
 
 
 
 ' T%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%W%  %%%%  %      %%%%  %%%%  %%%%  %%%%
 
 ' Q%    A I f a c e                       Q%  %%%%  %      %%%    %%%%  %        %%%
 
 ' Z%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%]%  %    %  %      %        %    %  %%%%  %%%%
 
 L a b e l   A I f a c e 
 
 ' 	 R e c o g n i z e E n c o d e r 
 
 	 T T S   S p e a k   " A I f a c e   d e m o n s t r a t i o n   s t a r t .   A I f a c e o:y _Y0" 
 
 	 W a i t   S e c o n d s   0 . 1 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " L o a d S e q u e n c e   T W i n G o _ A I f a c e . t x t " ) 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " E n a b l e R e p e a t " ) 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " S e l e c t L i n e   1 " ) 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " S t a r t E x e c u t i o n " ) 
 
 R e t u r n 
 
 
 
 
 
 L a b e l   C o p y P o s i t i o n s T o D e s t i n a t i o n s 
 
 	 S l o t   S l o t _ M 1 _ d e s B a s e   =   S l o t ( S l o t _ M 1 _ p o s B a s e ) 
 
 	 S l o t   S l o t _ M 2 _ d e s I n n e r   =   S l o t ( S l o t _ M 2 _ p o s I n n e r ) 
 
 	 S l o t   S l o t _ M 3 _ d e s M i d d l e   =   S l o t ( S l o t _ M 3 _ p o s M i d d l e ) 
 
 	 S l o t   S l o t _ M 4 _ d e s O u t e r   =   S l o t ( S l o t _ M 4 _ p o s O u t e r ) 
 
 R e t u r n 
 
 
 
 
 
 
 
 L a b e l   S e t M o t o r _ O N   	 ' ( M o t o r   N u m b e r ) 
 
 	 V a r i a b l e   N u m e r i c   S M O N 1 
 
 	 ' S M O N 1   =   S l o t _ M 1 _ d e s B a s e _ c e n t e r   +   ( S M O N 1 * 1 0 0 - 1 0 0 )         '   l i v i o 
 
 	 S l o t   S M O N 1   =   0 
 
 	 W a i t   S e c o n d s   0 . 1 
 
 	 S l o t   S M O N 1   =   1 
 
 	 W a i t   S e c o n d s   0 . 1 
 
 R e t u r n 
 
 
 
 L a b e l   S e t M o t o r _ O F F   	 ' ( M o t o r   N u m b e r ) 
 
 	 V a r i a b l e   N u m e r i c   S M O F F 1 
 
 	 ' S M O F F 1   =   S l o t _ M 1 _ d e s B a s e _ c e n t e r   +   ( S M O F F 1 * 1 0 0 - 1 0 0 )         '   l i v i o 
 
 	 S l o t   S M O F F 1   =   1 
 
 	 W a i t   S e c o n d s   0 . 1 
 
 	 S l o t   S M O F F 1   =   0 
 
 	 W a i t   S e c o n d s   0 . 1 
 
 R e t u r n 
 
 
 
 L a b e l   W a i t A l l M o t o r s 
 
 	 V a r i a b l e   N u m e r i c   W M N 1 
 
 	 F o r   W M N 1   =   1   T o   4 
 
 	 	 W a i t M o t o r ( W M N 1 ) 
 
 	 N e x t 
 
 R e t u r n 
 
 
 
 '   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
 '   T h e   " W a i t   s e c o n d s "   p a r a m e t e r   i s   a   i n i t i a l   d e l a y 
 
 '   I f   t h i s   d e l a y   i s   s h o r t   a n d   t h e   m o t o r   s t a r t s   s l o w l y 
 
 '   t h e n   t h e   " W a i t M o t o r "   f u n c t i o n s   c o u l d   e x i t   i m m e d i a t e l y 
 
 '   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
 L a b e l   W a i t M o t o r   	 	 	 ' ( M o t o r   N u m b e r ) 
 
 	 V a r i a b l e   N u m e r i c   W M 1 
 
 	 W M 1   =   ( W M 1 * 1 0 0 - 1 0 0 ) 
 
 	 W a i t   S e c o n d s   0 . 1 
 
 	 V a r i a b l e   N u m e r i c   W M 3 
 
 	 F o r   W M 3   =   0   T o   I n f i n i t y 
 
 	 	 I f   S l o t ( S l o t _ M 1 _ d e s B a s e   +   2   +   W M 1 )   =   0   O r   K e y ( " C T R L " )     '   t e s t   V e l o c i t y 
 
 	 	 	 E x i t   1 
 
 	 	 E n d I f 
 
 	 	 ' I f   S l o t ( S l o t _ M 1 _ d e s B a s e   +   6   +   W M 1 )   =   0   O r   K e y ( " C T R L " )   '   t e s t   M o v i n g 
 
 	 	 ' 	 E x i t   F o r 
 
 	 	 ' E n d I f 
 
 	 N e x t 
 
 R e t u r n 
 
 
 
 L a b e l   M o v e M o t o r T o   	 	 	 ' ( M o t o r   N u m b e r ) ( D e s t i n a t i o n ) 
 
 	 V a r i a b l e   N u m e r i c   M M T 1 
 
 	 V a r i a b l e   N u m e r i c   M M T 2 
 
 	 S l o t ( S l o t _ M 1 _ d e s B a s e   +   M M T 1 * 1 0 0 - 1 0 0 )   =   M M T 2 
 
 	 W a i t M o t o r ( M M T 1 ) 
 
 R e t u r n 
 
 
 
 '   T%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%W%
 
 '   Q%  A C T I V A T E   M O T O R S                                                         Q%
 
 '   Z%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%]%
 
 L a b e l   A c t i v a t e M o t o r s 
 
 	 V a r i a b l e   N u m e r i c   A M 1 
 
 	 F o r   A M 1   =   1   T o   4 
 
 	 	 S e t M o t o r _ O N ( A M 1 ) 
 
 	 N e x t 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " S e t T o r q u e M i n   2 0 0 " ) 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " S e t A c c e l e r a t i o n   1 0 0 " ) 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " S e t S p e e d   1 0 0 0 " ) 
 
 	 ' S e n d C o m m a n d ( S l o t _ C o m m a n d s T o M o t o r s ) ( S h o w W i n d o w ) 
 
 R e t u r n 
 
 
 
 ' L a b e l   D e A c t i v a t e M o t o r s 
 
 ' 	 V a r i a b l e   N u m e r i c   D M 1 
 
 ' 	 F o r   D M 1   =   1   T o   4 
 
 ' 	 	 S e t M o t o r _ O F F ( D M 1 ) 
 
 ' 	 N e x t 
 
 ' R e t u r n 
 
 
 
 ' T%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%W%  %%%%  %%%%  %%  %%  %%  %%      %%%  %%%%      %%%%  %%%%  %%%    %%%%  %%%%%
 
 ' Q%C O M M A N D S   F R O M   C O B O T Q%  %        %    %  %  %  %  %  %  %      %%    %%%%      %        %    %  %%%%  %    %      %
 
 ' Z%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%]%  %%%%  %%%%  %      %  %      %      %      %  %%      %%%%  %%%%  %%%%  %%%%      %
 
 L a b e l   E v e n t _ E x t e r n a l C o m m a n d s 
 
 	 '   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   D o   n o t   p r i n t   l i n e s   c o n t a i n i n g   ' ' 
 
 	 ' P r i n t   "   E x e c :   "   +   C o m m a n d T e x t   +   C R L F 
 
 	 '   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
 	 S e l e c t   G e t S e p a r a t e d S t r i n g ( C o m m a n d T e x t ,   0 ) 
 
 	 	 '   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   A C T I O N S 
 
 	 	 C a s e   " S a y " 
 
 	 	 	 T T S   S p e a k   M i d ( C o m m a n d T e x t ,   5 ) 
 
 	 	 	 C l e a r C o m m a n d 
 
 	 	 C a s e   " S a y W " 
 
 	 	 	 T T S   S p e a k   M i d ( C o m m a n d T e x t ,   5 ) 
 
 	 	 	 W a i t   T T S r e a d y 
 
 	 	 	 C l e a r C o m m a n d 
 
 	 	 	 	 	 '   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   S T A R T / S T O P   V o i c e 
 
 	 	 C a s e   " S t a r t V o i c e " 
 
 	 	 	 S t a r t V o i c e 
 
 	 	 	 C l e a r C o m m a n d 
 
 	 	 C a s e   " S t o p V o i c e " 
 
 	 	 	 S t o p V o i c e 
 
 	 	 	 C l e a r C o m m a n d 
 
 	 	 	 
 
                 ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   M i c r o V i d e o 
 
 	 	 C a s e   " S t a r t V i d e o " 
 
 	 	 	 S t a r t V i d e o 
 
 	 	 	 C l e a r C o m m a n d 
 
 	 	 C a s e   " S t o p V i d e o " 
 
 	 	 	 S t o p V i d e o 
 
 	 	 	 C l e a r C o m m a n d 
 
 	 	 C a s e   " S a v e V i d e o " 
 
 	 	 	 S a v e V i d e o 
 
 	 	 	 C l e a r C o m m a n d 
 
 	 	 C a s e   " T a k e I m a g e " 
 
 	 	 	 T a k e I m a g e 
 
 	 	 	 C l e a r C o m m a n d 
 
 	 	 	 
 
 	 	 C a s e E l s e 
 
 	 	 	 C o n t r o l s   O p e n T e x t B o x 
 
 	 	 	 P r i n t   C R L F   +   "   U n r e c o g n i z e d   c o m m a n d :   "   +   C o m m a n d T e x t   +   C R L F 
 
 	 	 	 ' B e e p 
 
 	 	 	 C l e a r C o m m a n d 
 
 	 E n d S e l e c t 
 
 R e t u r n 
 
 
 
 '   T%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%W%  %      %  %  %%%%  %%%%  %%%%
 
 '   Q%  V I D E O   C O M M A N D S             Q%    %  %    %  %    %  %%%    %    %
 
 '   Z%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%]%      %      %  %%%%  %%%%  %%%%
 
 V a r i a b l e   N u m e r i c   R e c o r d E n a b l e d 
 
 L a b e l   V i d e o O n O f f 
 
 	 I f   R e c o r d E n a b l e d   =   0 
 
 	 	 S t a r t S c o p e 
 
 	 	 S t a r t V i d e o 
 
 	 	 R e c o r d E n a b l e d   =   1 
 
 	 	 B u t t o n   V i d e o O n O f f   T e x t   " R E C O R D I N G " 
 
 	 	 B u t t o n   V i d e o O n O f f   C o l o r   F l a s h i n g 5   R e d   B l a c k 
 
 	 E l s e 
 
 	 	 R e c o r d E n a b l e d   =   0 
 
 	 	 B u t t o n   V i d e o O n O f f   T e x t   " R E C O R D   O F F " 
 
 	 	 B u t t o n   V i d e o O n O f f   C o l o r   L i g h t C y a n 
 
 	 	 S t o p V i d e o 
 
 	 	 S t o p S c o p e 
 
 	 E n d I f 
 
 R e t u r n 
 
 
 
 L a b e l   S t a r t V i d e o 
 
 	 ' R e s e t T i m e 
 
 	 S l o t ( S l o t _ S t a r t S t o p V i d e o )   =   1 0 0 0 
 
 	 W a i t   S e c o n d s   0 . 2 
 
 R e t u r n 
 
 
 
 L a b e l   S t o p V i d e o 
 
 	 P r i n t   " S e c o n d s   "   +   F o r m a t ( E l a p s e d T i m e   -   S t a r t T i m e ,   " 0 . 0 0 0 0 0 0 " ) 
 
 	 S l o t ( S l o t _ S t a r t S t o p V i d e o )   =   0 
 
 	 W a i t   S e c o n d s   0 . 2 
 
 R e t u r n 
 
 
 
 L a b e l   S a v e V i d e o 
 
 	 B u t t o n   S a v e V i d e o   T e x t   " S a v i n g " 
 
 	 B u t t o n   S a v e V i d e o   C o l o r   F l a s h i n g 8   R e d   Y e l l o w 
 
 	 S l o t ( S l o t _ S a v e V i d e o )   =   1 0 0 0 
 
 	 W a i t   S e c o n d s   0 . 5 
 
 	 S l o t ( S l o t _ S a v e V i d e o )   =   0 
 
 	 W a i t   S e c o n d s   0 . 2 
 
 	 B u t t o n   S a v e V i d e o   T e x t   " S a v e   V i d e o " 
 
 	 B u t t o n   S a v e V i d e o   C o l o r   L i g h t B l u e 
 
 R e t u r n 
 
 
 
 L a b e l   T a k e I m a g e 
 
 	 ' W a i t   S e c o n d s   1 . 5 
 
 	 S l o t ( S l o t _ T a k e I m a g e )   =   1 0 0 0 
 
 	 W a i t   S e c o n d s   0 . 2 
 
 	 S l o t ( S l o t _ T a k e I m a g e )   =   0 
 
 	 W a i t   S e c o n d s   0 . 2 
 
 R e t u r n 
 
 
 
 
 
 
 
 
 
 '   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 '     P R I N T   C O O R D I N A T E S 
 
 '   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 L a b e l   P r i n t V a l u e s 
 
 	 ' s 1   =               " X = "   +   F o r m a t ( S l o t ( S l o t _ M 1 _ d e s B a s e _ X ) ,   " 0 . 0 0 0 " ) 
 
 	 ' s 1   =   s 1   +   "   Y = "   +   F o r m a t ( S l o t ( S l o t _ M 2 _ d e s I n n e r _ Y ) ,   " 0 . 0 0 0 " ) 
 
 	 ' s 1   =   s 1   +   "   Z = "   +   F o r m a t ( S l o t ( S l o t _ M 3 _ d e s M i d d l e _ Z ) ,   " 0 . 0 0 0 " ) 
 
 	 ' P r i n t   C R L F   +   s 1 
 
 R e t u r n 
 
 
 
 '   T%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%W%  %%%%%  %%%%  %  %%%%  %
 
 '   Q%  T   R   I   A   L   S                                             Q%      %      %%%%  %  %%%%  %
 
 '   Z%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%]%      %      %  %%  %  %    %  %%%
 
 
 
 
 
 '   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 '     r e - s e t   h o m e   p o s i t i o n .   B e f o r e   u s e ,   a l l   m o t o r   m u s t   b e   t o   1 8 0 
 
 '   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 L a b e l   R e S e t H o m e P o s i t i o n 
 
 	 ' Z e r o F e e t e c h ( 1 ) 
 
 	 Z e r o F e e t e c h ( 2 ) 
 
 R e t u r n 
 
 
 
 L a b e l   Z e r o F e e t e c h 
 
 	 '   - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   i n i t i a l i z e   m o t o r   a d d r e s s 
 
 	 V a r i a b l e   N u m e r i c   Z F 1 
 
 	 Z F 1   =   ( Z F 1   +   1 )   *   5 0 
 
 	 '   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
 	 S l o t ( Z F 1   +   2 3 )   =   1 2 8     ' a l i g n   c u r r e n t   p o s i t i o n   t o   2 0 4 8 
 
 	 W a i t   S e c o n d s   0 . 0 5 
 
 	 S l o t ( Z F 1   +   2 3 )   =   1         ' r e s t o r e   n o r m a l   f u n c t i o n 
 
 	 W a i t   S e c o n d s   0 . 0 5 
 
 	 '   - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   c o p y   p o s i t i o n   t o   d e s t i n a t i o n 
 
 	 S l o t ( Z F 1   +   1 )   =   S l o t ( Z F 1   +   2 ) 
 
 	 W a i t   S e c o n d s   0 . 0 5 
 
 	 '   - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   m o v e   t o   d e s i d e r e d   p o s i t i o n 
 
 	 ' S l o t ( Z F 1   +   1 )   =   S l o t ( Z F 1   +   2 )   +   1 0 
 
 	 ' F o r   v 1   =   0   T o   1 0 0 0 
 
 	 ' 	 W a i t   S e c o n d s   0 . 0 5 
 
 	 ' 	 I f   S l o t ( Z F 1   +   7 )   =   0 
 
 	 ' 	 	 E x i t 
 
 	 ' 	 E n d I f 
 
 	 ' N e x t 
 
 	 '   - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   z e r o   t o   m o t o r 
 
 	 ' S l o t ( Z F 1   +   2 3 )   =   1 2 8     ' a l i g n   c u r r e n t   p o s i t i o n   t o   2 0 4 8 
 
 	 ' W a i t   S e c o n d s   0 . 0 5 
 
 	 ' S l o t ( Z F 1   +   2 3 )   =   1         ' r e s t o r e   n o r m a l   f u n c t i o n 
 
 	 ' W a i t   S e c o n d s   0 . 0 5 
 
 	 ' '   - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   c o p y   p o s i t i o n   t o   d e s t i n a t i o n 
 
 	 ' S l o t ( Z F 1   +   1 )   =   S l o t ( Z F 1   +   2 ) 
 
 	 ' W a i t   S e c o n d s   0 . 0 5 
 
 R e t u r n 
 
 
 
 
 
 ' B O O K M A R K S   
 
 
 
 ' E D I T E D L I N E S   2 9 6   8   4 0 2   9   3 9 7   1 0   
 
 
 
 ' W A T C H   C R 
 
 